package com.hzy.fivepalace.common.type;

/**
 * 优惠券状态类型枚举
 */
public enum CouponsStatusEnums {
    TYPE0(0, "未使用"),
    TYPE1(1, "已使用"),
    TYPE2(2, "已过期");
    private int id;

    private String desc;

    CouponsStatusEnums(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static CouponsStatusEnums getEnum(int type) {
        for (CouponsStatusEnums sharems : CouponsStatusEnums.values()) {
            if (type == sharems.getId()) {
                return sharems;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }
}
